package demo.security.example.model.validator;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * UserValidator
 *
 * @author lidj
 * @date 2018-01-09
 */
public class UserValidator implements ConstraintValidator<UserValidatorConstraint,Object> {

    @Override
    public void initialize(UserValidatorConstraint constraintAnnotation) {
        System.out.println("UserValidator init");
    }

    @Override
    public boolean isValid(Object value, ConstraintValidatorContext context) {
        System.out.println(value);
        return false;
    }
}
